<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>demo</title>
    <link rel="stylesheet" href="../layui/css/layui.css">
    <script src="../layui/layui.js"></script>
</head>

<body>
    <button type="button" class="layui-btn" onclick="show_jmSheet()">弹出面板</button>
</body>
<script>
    // 配置
    layui.config({
        base: "../model/"
    })
    //弹出面板
    function show_jmSheet() {
        layui.use(["jmSheet"], function () {
            var jmSheet = layui.jmSheet;

            jmSheet.open({
                id: "", //layer id
                title: "标题",// 可设置标题,也可不设置
                shadeClose: false, // 是否点击遮罩关闭
                align: "center",//可选位置，默认居中,left左对齐,right右对齐
                content: [
                    { text: "选项一" },
                    { text: "选项二", desc: "这里是描述信息" }, //可带描述信息
                    { text: "选项三", img: '../dota_火女.png' }, //可带图片
                ],
                addClass: "addClass", //可追加class
                callback: function (index, dom, data) { //点击回调
                    console.log(index, dom, data)
                }
            })
        })
    }
</script>

</html>